<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>

<head>

</head>

<body>

<div id="wrapper">
    <div class="gray-bg">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox">
                        <div class="ibox-content">
                            <div class="search-area">
                                <form role="form" class="form-inline" id="queryform">
                                    <input type="hidden"  name="mid"
                                           class="form-control form-filter" value="${mid}">
                                    <input type="hidden"  name="dvtype"
                                           class="form-control form-filter" value="${dvtype}">
                                </form>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover dataTables" id="data-table"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>


<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {
        var setting = {
            "ajax": {
                "url": "${ctx}/admin/semRecord/sem/list",
                "type": "POST"
            },
            "columns": [
                {"title": "项目名称", "data": "title", "width": "10%", "orderable": true},
                {"title": "结果", "data": "result", "width": "10%", "orderable": true},
                {"title": "单位", "data": "untis", "width": "10%", "orderable": true},
                {"title": "参考范围", "data": "rrs", "width": "20%", "orderable": true},
                {"title": "提示", "data": "ts", "width": "20%", "orderable": true},
            ],
            "columnDefs": [
                {
                    "targets": 3,
                    "render": function (data, type, row, meta) {
                        var val = row.rrs ? row.rrs : '-';
                        return val;
                    }
                },
                {
                    "targets": 4,
                    "render": function (data, type, row, meta) {
                        var val = row.ts ? row.ts : '-';
                        return '<label style="color: red;">' + val + '</label>';
                    }
                }
            ],
            "order": [
                [0, "desc"]
            ]
        };
        /* Init DataTables */
        $('#data-table').DataTable(ehconfig.get_datatable_config(setting));
        submitFilter = function () {
            $('#data-table').DataTable().draw();
        }
    });


</script>

</body>

</html>
